package com.lvmama.pangolin.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lvmama.pangolin.entity.Product;
import com.lvmama.pangolin.entity.ProductConditionVO;
import com.lvmama.pangolin.mybatis.mapper.ProductMapper;
import com.lvmama.pangolin.service.ProductService;

@Service("productService")
public class ProductServiceImpl implements ProductService,Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Autowired
	private ProductMapper productMapper;
	
	@Override
	public PageInfo<Product> getAllList(ProductConditionVO pc) {
		PageHelper.startPage(pc.getPage(), pc.getPageSize());
		List<Product> product = (List<Product>) productMapper.getAllList(pc);
        PageInfo<Product> page = new PageInfo<Product>(product);
		return page;
	}

	@Override
	public Integer productObj(Product product) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Integer getCountForCode(String code) {
		// TODO Auto-generated method stub
		return null;
	}

}
